cask "thunderbird@esr" do
  version "140.5.0esr"

  language "af" do
    sha256 "afecb912c6e9fe26d3f0859ca2ff305a7bb0d44a02ff8186f6e77a6b50637b92"
    "af"
  end
  language "ar" do
    sha256 "b357d0de331ad016bfc277f65642a37bb4b6d990e87c3811ffd1874e24858af2"
    "ar"
  end
  language "be" do
    sha256 "eb80313f5c8bacde300fc0ddafcffcad836f05bff0e269e5b3137bd750c4ce68"
    "be"
  end
  language "bg" do
    sha256 "c94fd625c8d30e450ecbb3a9f62f0b9a185030faf716ac2ac7f9397172c44bc0"
    "bg"
  end
  language "ca" do
    sha256 "42d2493bcc39f10bb820dfbb8a193552d707e9fe04b21d1238cf7f4416738991"
    "ca"
  end
  language "cs" do
    sha256 "f5ca98cbe4a2d5a6a3d8a1416a34910cfaa4fa00ba45fb36c8ac4b4a8f22335c"
    "cs"
  end
  language "cy" do
    sha256 "b3d890775b923b8500e5eb5b9a1d4218763be60f5fdf137bba70626bfda633dc"
    "cy"
  end
  language "da" do
    sha256 "5e624b70be43b77ec1fecc047a3bd52f4df45b35a8b562e9e10310f47049a412"
    "da"
  end
  language "de" do
    sha256 "c18bc81a110e5ca4ebf1c6069c3a920776afea95fe69466f0ccf9068f704767c"
    "de"
  end
  language "el" do
    sha256 "c84d4cefa5718406a92eac37c0419b74d48ee48477f5d6ce0397b933acbcc6a4"
    "el"
  end
  language "en-CA" do
    sha256 "326b3b5275772ba707b691fa1fa8ba1a47304b24e622e3ff548f56c03f1b1bea"
    "en-CA"
  end
  language "en-GB" do
    sha256 "71a51733330b1f378519dd02aac6ff447911d4c33478cf44ece7023c4350725b"
    "en-GB"
  end
  language "en", default: true do
    sha256 "95f0e0680a3f0ddbcffa7dffb1ebd0342e91245a048078a23b2b28bb303c48b3"
    "en-US"
  end
  language "es-ES" do
    sha256 "1eda2c19378407b444611f63324291bd293820b95b55bfee57884596e8170a23"
    "es-ES"
  end
  language "es-MX" do
    sha256 "c30ba943e273f6ab8c83af3a8e896eb098ec5217f837889f644820ecc623c923"
    "es-MX"
  end
  language "et" do
    sha256 "abaaf9b10a51fae77edb5a5511049b495fd715d1e3e435cf246aa8d589702943"
    "et"
  end
  language "fi" do
    sha256 "43ffcde02a795df46c3861b7abdf24e72b6129b7f706809c901b1637d14783af"
    "fi"
  end
  language "fr" do
    sha256 "43d117f545f08802148b72432b738b3b740abb4e4e7743692ef389955f08e3db"
    "fr"
  end
  language "fy" do
    sha256 "9e319356b6e8e8db988d8b3108793de8ad46e27f36da7865a8504f8e2edf7ae5"
    "fy-NL"
  end
  language "ga" do
    sha256 "6864085bf1adc4826ee5753a69a75a0ed812ea300861899ebc96d003d8d36604"
    "ga-IE"
  end
  language "gd" do
    sha256 "55dda91707ac7e5ec2c043b54e4a4dc81f54d74f1dd87dcb7fd8ec593a14cffc"
    "gd"
  end
  language "gl" do
    sha256 "aa4d6f3fb52dfc78f851972d3054be3dc7e197e621f96bdaedf8cd56e2472c0f"
    "gl"
  end
  language "he" do
    sha256 "8eb23a752d01eb66901cd8bc7f925376b5f333fb06fd3539c747fc36a63820a0"
    "he"
  end
  language "hr" do
    sha256 "c2d232d884337fa9e01e24b7b843a743eeea713c5868e3fe85df0d09c0fd76ca"
    "hr"
  end
  language "hu" do
    sha256 "f5fe4a01ced3ef6a42463a09c73ed89a31625c8899324f29a6dc8f2e36b5c2ef"
    "hu"
  end
  language "hy" do
    sha256 "b00dd571dbc2b5cb83cb2dd2bfc27b39fe1db83d7bf35791afa12d4700fe3c39"
    "hy-AM"
  end
  language "is" do
    sha256 "5d3e0cb85ecb60ea1c2490505e7b37b729a211f057ba8a51827e3c74599d34cb"
    "is"
  end
  language "it" do
    sha256 "65501fadba693b411cb14d5470e3b2b74547c9e9f464340c99b51cc703180207"
    "it"
  end
  language "ja" do
    sha256 "da78fdd146ab0a53f4bd06324b896e7cb7b584b0b918572d51b8672d2011eee0"
    "ja-JP-mac"
  end
  language "ka" do
    sha256 "af6bc0f89d86e49563c8bfae621183fd9408b228964cbf516a5e7af8f8688af2"
    "ka"
  end
  language "ko" do
    sha256 "d1696003692ed2883b3bffa8e558259440b02032584c50f1a6b068adbd7f50e6"
    "ko"
  end
  language "lt" do
    sha256 "61e31e9ca43e8e47c35325913bef4f93a8597a2f02e031da26e9edc763beaf47"
    "lt"
  end
  language "lv" do
    sha256 "af48fcab7ba2c54680a19c18c09c05a0b69097be10882c4d255eaf84e77fba8d"
    "lv"
  end
  language "ms" do
    sha256 "effbeb03e03578716aa360e19b33029dd3afba50353f1b33e7987a101817b612"
    "ms"
  end
  language "nb" do
    sha256 "c071f1915176e6307923b7e39bdc262b274b57dee203b6a465ec374c204be22e"
    "nb-NO"
  end
  language "nl" do
    sha256 "b5c36b8aba1940fdc370253367c1516b2c09605b6a26b8f01e6665e44540bd07"
    "nl"
  end
  language "pa-IN" do
    sha256 "3c622f457717d4676ae3dd81df860767e43d4aec0d11c1dba693cde6fbc30db2"
    "pa-IN"
  end
  language "pl" do
    sha256 "ceab029e1ebae93568c98f77bd05983e3682fc14b2f250a6a0c2c51cd5b7192c"
    "pl"
  end
  language "pt" do
    sha256 "72d47debf3856dba067710dff3ae94363a263ed0739a963f35a141188c29cbe2"
    "pt-PT"
  end
  language "pt-BR" do
    sha256 "17973b1ac86c37b2075a717e7fa1f3b87e47a8c8be5fbba03f40345a63779cb8"
    "pt-BR"
  end
  language "rm" do
    sha256 "5968700bffaaae64e6891a101cdc3c7ffb03f97dbe577c44d706baec4ce29008"
    "rm"
  end
  language "ro" do
    sha256 "ed751b9717665f17d48055740e49f4358d41ede58d1d21f72802bceda96dd4d2"
    "ro"
  end
  language "ru" do
    sha256 "e828fc0114c3a78acd572d785d4d88c307ec5adbe58e8c8e28f2da4fc7fb4d1d"
    "ru"
  end
  language "sk" do
    sha256 "883cb2a4a28b6de598620772693f5aad6738671a4d9b577cbbf74cfcc3bee462"
    "sk"
  end
  language "sl" do
    sha256 "d812522d3383531e3a633aa17287f157afcbc27a621dca23e43d988b94217c60"
    "sl"
  end
  language "sq" do
    sha256 "58b31405027db66dc32c70460383d756c75c63c22f2f857463b1bab33c0bd5a1"
    "sq"
  end
  language "sr" do
    sha256 "8f8eeda20b7cfebac8190aa17c65b399a4a84e80ea6c90a0b7234a0dfa36e67b"
    "sr"
  end
  language "sv" do
    sha256 "0ec6f0984a1087d7b3a21ced52e40a2fec1cc8750d79928c38b8c429da36b5d3"
    "sv-SE"
  end
  language "th" do
    sha256 "7f3358033289b6bf4c48dfa079ee63db11957b96e03db1f531deab8e9b9420df"
    "th"
  end
  language "tr" do
    sha256 "9b1295695c7db8c01a34ecd6c44909c08d90dcfd54e64e6aae243edd05168540"
    "tr"
  end
  language "uk" do
    sha256 "c03383c31a9f58f120870142c79d7705cb12ef4c0f3d79e969ccafec2bedcfb6"
    "uk"
  end
  language "uz" do
    sha256 "4ef0d8efe36b95a610be6ea0e98ebf9ca07dc16a8976eb684947b74bd0be898a"
    "uz"
  end
  language "vi" do
    sha256 "9ab60377f7ef4ec7b3211a6818cf1fe70d07a1cab6e754af124f7ae4a7882d77"
    "vi"
  end
  language "zh-TW" do
    sha256 "60236dd6e77637fd0fc77c14e988dc8c28a296b14c47dac4da34e68977546169"
    "zh-TW"
  end
  language "zh" do
    sha256 "8dc89a32ad3d64e6c52658fcb994a44e192ee2f0fad0b7a56ff1d9957a101438"
    "zh-CN"
  end

  url "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/#{version}/mac/#{language}/Thunderbird%20#{version}.dmg",
      verified: "download-installer.cdn.mozilla.net/pub/thunderbird/"
  name "Mozilla Thunderbird ESR"
  name "Mozilla Thunderbird Extended Support Release"
  desc "Customizable email client"
  homepage "https://www.thunderbird.net/#{language}/download/esr/"

  livecheck do
    url "https://product-details.mozilla.org/1.0/thunderbird_versions.json"
    strategy :json do |json|
      json["THUNDERBIRD_ESR"]
    end
  end

  auto_updates true
  conflicts_with cask: "thunderbird"

  app "Thunderbird.app"

  zap trash: [
        "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.thunderbird*.sfl*",
        "~/Library/Caches/Mozilla/updates/Applications/Thunderbird*",
        "~/Library/Caches/Thunderbird",
        "~/Library/Preferences/org.mozilla.thunderbird*.plist",
        "~/Library/Saved Application State/org.mozilla.thunderbird*.savedState",
        "~/Library/Thunderbird",
      ],
      rmdir: "~/Library/Caches/Mozilla"
end
